package org.jeecg.modules.logistics.manage.qz_info.controller;

import org.apache.catalina.LifecycleState;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import lombok.extern.slf4j.Slf4j;

import org.jeecg.modules.logistics.manage.qz_info.entity.QzInfo;
import org.jeecg.modules.logistics.manage.qz_info.service.IQzInfoService;
import org.jeecg.modules.logistics.manage.sj_info.entity.SjInfo;
import org.jeecg.modules.logistics.manage.sj_info.service.ISjInfoService;

import org.jeecg.modules.logistics.table.cl.entity.Cl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 物流接单信息
 * @Author: 唐小尊
 * @Date: 2019-11-21
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "司机信息")
@RestController
@RequestMapping("/my/qzInfo")
public class QzInfoController {
    @Autowired
    private IQzInfoService qzInfoService;

    /**
     * 得到一个求助信息
     * @return
     */
    @AutoLog(value = "得到一个求助信息")
    @ApiOperation(value = "得到一个求助信息", notes = "得到一个求助信息")
    @GetMapping(value = "/getOneQz")
    public Result<QzInfo> getOneQz(String qzId) {
        Result<QzInfo> result = new Result<QzInfo>();
        QzInfo qzInfo = qzInfoService.getOneQz(qzId);
        result.setResult(qzInfo);
        result.success("查找成功！");
        return result;
    }

    /**
     * 得到一个司机信息
     * @return
     */
    @AutoLog(value = "得到一个司机信息")
    @ApiOperation(value = "得到一个司机信息", notes = "得到一个司机信息")
    @GetMapping(value = "/getQzInfo")
    public Result<List<QzInfo>> getAllQz(int thisIndex) {
        Result<List<QzInfo>> result = new Result<List<QzInfo>>();
        List<QzInfo> qzInfos = qzInfoService.getAllQz(thisIndex);
        result.setResult(qzInfos);
        result.success("查找成功！");
        return result;
    }

}
